package dao;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;
import java.util.List;

public class SchoolService {
    private static SchoolService schoolService = null;
    public static SchoolService getInstance() {
        if(schoolService == null){
            schoolService = new SchoolService();
        }
        return schoolService;
    }
    public Collection<School> findAll(List<Condition> conditionList, Pagination pagination) throws SQLException, SQLException {
        Connection connection = JdbcHelper.getConn();
        Collection<School> schools = SchoolDao.getInstance().findAll(conditionList,pagination);
        JdbcHelper.close(connection);
        return schools;
    }
}
